import { axios } from '../../../utils/request'

const api = {
    save: '/finance/assetsLiabilities/save', //保存负责表
    getFormulaList: '/finance/assetsLiabilities/getFormulaList',//获取公式列表
    getAssetsLiabilities: '/finance/assetsLiabilities/getAssetsLiabilities',//获取负债表
    getAccountingLedger: '/finance/assetsLiabilities/getAccountingLedger', //获取科目总账
    getAccountingLedgers: '/erp/accounting/listCurrentAll', //获取科目总账
    list: '/erp/period/list', //获取当前 租户的 会计期间
    saveFormula:'/finance/assetsLiabilities/saveFormula' // 保存公式
}
/**
 * 保存
 */
export function save(data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 保存公式
 */
 export function saveFormula(data) {
  return axios({
      url: api.saveFormula,
      method: "post",
      data: data
  })
}
/**
 * 获取公式列表
 */
export function getFormulaList(data) {
    return axios({
        url: api.getFormulaList,
        method: "get",
        params: data
    })
}

/**
 * 获取科目总账
 */
 export function getAccountingLedger(data) {
  return axios({
      url: api.getAccountingLedger,
      method: "get",
      params: data
  })
}


/**
 * 获取科目总账 附
 */
 export function getAccountingLedgers(data) {
  return axios({
      url: api.getAccountingLedgers,
      method: "get",
      params: data
  })
}

/**
 * 获取负债表
 */
 export function getAssetsLiabilities(data) {
  return axios({
      url: api.getAssetsLiabilities,
      method: "get",
      params: data
  })
}

/**
 *    获取期间
 */

export function periodlist() {
  return axios({
      url: api.list,
      method: "get"
  })
}


